Methods and apparatus for driver calibration

ABSTRACT

Various embodiments of the present technology may comprise methods and apparatus for driver calibration. The methods and apparatus may comprise various circuits and/or systems to minimize an offset output current (e.g., a drive current) due to an offset voltage in an operational amplifier. The methods and apparatus may comprise a current comparator circuit and a replica circuit that operate in conjunction with each other to monitor the drive current and provide a feedback signal, which is then used to adjust the drive current and improve the accuracy of the drive current.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. patent application Ser. No. 16/002,179, filed on Jun. 7, 2018, and incorporates the disclosure of the application in its entirety by reference.

BACKGROUND OF THE TECHNOLOGY

Electronic devices, such as cellular telephones, cameras, and computers, commonly use a lens module in conjunction with an image sensor to capture images. Many imaging systems employ autofocus methods and various signal processing techniques to improve image quality by adjusting the position of the lens relative to the image sensor.

Autofocus systems generally utilize a driver and an actuator to move the lens to an optimal position to increase the image quality. The system also utilizes operation amplifiers to facilitate signal propagation. The operation amplifier, however, may experience an offset voltage, which results in the driver producing an output current that differs from an expected (ideal) current. For high performance drivers, the variation between the actual output current and the ideal must be reduced or removed.

SUMMARY OF THE INVENTION

Various embodiments of the present technology may comprise methods and apparatus for driver calibration. The methods and apparatus may comprise various circuits and/or systems to minimize an offset output current (e.g., a drive current) due to an offset voltage in an operational amplifier. The methods and apparatus may comprise a current comparator circuit and a replica circuit that operate in conjunction with each other to monitor the drive current and provide a feedback signal, which is then used to adjust the drive current and improve the accuracy of the drive current.

BRIEF DESCRIPTION OF THE DRAWINGS

A more complete understanding of the present technology may be derived by referring to the detailed description when considered in connection with the following illustrative figures. In the following figures, like reference numbers refer to similar elements and steps throughout the figures.

FIG. 1 is a block diagram of an imaging system in accordance with an exemplary embodiment of the present technology;

FIG. 2 is a circuit diagram of a control circuit in accordance with an exemplary embodiment of the present technology;

FIG. 3 is a graph of an ideal output current, an actual output current, and a corrected output current of a driver in accordance with an exemplary embodiment of the present technology; and

FIG. 4 is a graph of driver voltages in accordance with an exemplary embodiment of the present technology.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

The present technology may be described in terms of functional block components and various processing steps. Such functional blocks may be realized by any number of components configured to perform the specified functions and achieve the various results. For example, the present technology may employ various actuators, sensors, lenses, current generators, controllers, signal converters, semiconductor devices, such as transistors and capacitors, and the like, which may carry out a variety of functions. In addition, the present technology may be practiced in conjunction with any number of systems, such as automotive, aerospace, medical, scientific, surveillance, and consumer electronics, and the systems described are merely exemplary applications for the technology. Further, the present technology may employ any number of conventional techniques for capturing image data, sampling image data, processing image data, and the like.

Methods and apparatus for driver calibration according to various aspects of the present technology may operate in conjunction with any suitable electronic system, such as imaging systems, “smart devices,” wearables, consumer electronics, and the like. Referring to FIG. 1, an exemplary imaging system 100 may be incorporated into an electronic device, such as a digital camera or portable computing device. For example, in various embodiments, the imaging system 100 may comprise a camera module 105 and an image signal processor (ISP) 130.

The camera module 105 may capture image data and perform various operating functions, such as autofocus and/or optical image stabilization. For example, the camera module 105 may comprise an image sensor 125, a lens module 115 positioned adjacent to the image sensor 125, and a control circuit 120. The control circuit 120 and the lens module 115 may be configured to communicate with each other and operate together to automatically focus an object or a scene on the image sensor 125.

The image sensor 125 may be suitably configured to capture image data. For example, the image sensor 125 may comprise a pixel array (not shown) to detect light and convey information that constitutes an image by converting the variable attenuation of light waves (as they pass through or reflect off the object) into electrical signals. The pixel array may comprise a plurality of pixels arranged in rows and columns, and the pixel array may contain any number of rows and columns, for example, hundreds or thousands of rows and columns. Each pixel may comprise any suitable photosensor, such as a photogate, a photodiode, and the like, to detect light and convert the detected light into a charge. The image sensor 125 may be implemented in conjunction with any appropriate technology, such as active pixel sensors in complementary metal-oxide-semiconductors (CMOS) and charge-coupled devices.

The lens module 115 may be configured to focus light on a sensing surface of the image sensor 125. For example, the lens module 115 may comprise a lens 135, with a fixed diameter, positioned adjacent to the sensing surface of the image sensor 125. The lens module 115 may further comprise an actuator 110, for example a linear resonant actuator, such as a voice coil motor (VCM), configured to move the lens 135 along an x-, y-, and z-axis.

In various embodiments, the imaging system 100 may be configured to move portions of the lens module 115 that secure the lens 135 to perform autofocus functions. For example, the lens module 115 may comprise a telescoping portion (not shown) that moves relative to a stationary portion (not shown). In various embodiments, the telescoping portion may secure the lens 135. As such, the actuator 110 may move the telescoping portion to shift the lens 135 away from or closer to the image sensor 125 to focus the object or scene on the image sensor 125. In various embodiments, the image sensor 125 may be fixed to the stationary portion or may be arranged at a fixed distance from the stationary portion.

In various embodiments, the image signal processor 130 may perform various digital signal processing functions, such as color interpolation, color correction, facilitate auto-focus, exposure adjustment, noise reduction, white balance adjustment, compression, and the like, to produce an output image. The image signal processor 130 may comprise any number of semiconductor devices, such as transistors, capacitors, and the like, for performing calculations, transmitting and receiving image pixel data, and a storage unit for storing pixel data, such as random-access memory, non-volatile memory or any other memory device suitable for the particular application. In various embodiments, the image signal processor 130 may be implemented with a programmable logic device, such as a field programmable gate array (FPGA) or any other device with reconfigurable digital circuits. In other embodiments, the image signal processor 130 may be implemented in hardware using non-programmable devices. The image signal processor 130 may be formed partially or entirely within an integrated circuit in silicon using any suitable complementary metal-oxide semiconductor (CMOS) techniques or fabrication processes, in an ASIC (application-specific integrated circuit), using a processor and memory system, or using another suitable implementation.

The image signal processor 130 may transmit the output image to an output device, such as a display screen or a memory component, for storing and/or viewing the image data. The output device may receive digital image data, such as video data, image data, frame data, and/or gain information from the image signal processor 130. In various embodiments, the output device may comprise an external device, such as a computer display, memory card, or some other external unit.

The control circuit 120 controls and supplies power to various devices within the system. For example, the control circuit 120 may control and supply power to the lens module 115 to move the actuator 110 and/or lens 135 to a desired position. The control circuit 120 may operate in conjunction with the image signal processor 130, the image sensor 125, and/or other systems to determine the appropriate amount of power and/or current to supply to the actuator 110. The control circuit 120 may comprise any suitable device and/or system capable of providing energy to the actuator 110. In an exemplary embodiment, the control circuit 120 may comprise a driver 235, a controller 210, a digital-to-analog converter (DAC) 215, an operational amplifier (op-amp) 220, a current generator 205, a feedback circuit 260, a current comparator circuit 250, and a replica circuit 225.

The controller 210 controls operation of the DAC 215. The controller 210 may receive signals from other components in the system, such as a clock signal (not shown), that the controller 210 utilizes to perform various control operations and/or generate various control signals. In an exemplary embodiment, the controller 210 may supply a DAC code to the DAC 215. The DAC code may comprise a first digital code. The controller 210 may generate the DAC code according to information from the image sensor 125, the ISP 130, and/or other relevant information.

According to an exemplary embodiment, the controller 210 may further comprise a memory (not shown) configured to store a plurality of offset calibration codes. The offset calibration codes may be stored, for example, in a look-up table or other suitable storage medium. The controller 210 may select and transmit one of the offset calibration codes (OCC) to the DAC 215 according to a comparator voltage V_(COMP) from the current comparator circuit 250. The OCC may comprise a second digital code.

The controller 210 may comprise any suitable circuit and/or system for generating digital signals, such as the DAC code and the OCC. For example, the controller 210 may comprise various logic circuits configured to perform comparisons, arithmetic functions, signal conversion, and the like.

In DAC 215 may convert a digital value to an analog value (e.g., a voltage) and generate output signals according to various input signals. According to an exemplary embodiment, the DAC 215 may be connected to the controller 210 and receive the DAC code and the OCC. The DAC 215 may generate a DAC output signal V_(DAC) according to the DAC code, and may further generate a calibration voltage V_(CAL) according to the OCC. The DAC 215 may be further connected to the op-amp 220 and configured to transmit the DAC output signal V_(DAC) to an input terminal of the op-amp 220. The DAC 215 may be further connected to the feedback circuit 260 and configured to transmit the calibration voltage V_(CAL) to the feedback circuit 260.

The feedback circuit 260 may be configured to generate a feedback voltage V_(F) according to the calibration voltage V_(CAL) and/or other signals. For example, the feedback circuit 260 may comprise various circuits, such as amplifiers, resistors, and the like, to amplify desired signals, amplify a differential signal, measure a voltage, and/or detect a current. According to an exemplary embodiment, the feedback voltage V_(F) is based on the calibration voltage V_(CAL) and a voltage drop across a sense resistor 245.

The sense resistor 245 may be connected to the driver 235 at a first end and a ground at a second end. The sense resistor 245 may be further connected to the feedback circuit 260 with connectors that connect the first end and the second end to the feedback circuit 260. Accordingly, the feedback circuit 260 can detect a drive current I_(DR) by measuring the voltage drop across the sense resistor 245.

The op-amp 220 may be configured to receive input signals and amplify a difference between the input signals (i.e., a differential input). The op-amp 220 may comprise an inverting terminal (−) for receiving a first input signal and a non-inverting terminal (+) for receiving a second input signal. In an exemplary embodiment, the op-amp 220 is connected to the DAC 215 and configured to receive the DAC output signal V_(DAC) at the non-inverting terminal (+) and the feedback voltage V_(F) at the inverting terminal (−). The op-amp 220 may comprise a conventional op-amp 220 formed using transistors, resistors, and capacitors.

Due to the manufacturing process, the transistors used to form the op-amp 220 may not be exactly matched, which causes the op-amp 220 to have an output V_(OUT_AMP) that is zero at a non-zero value of the differential input. This is generally referred to as the input offset voltage and this offset contributes to the offset current.

The current generator circuit 205 may be configured to generate a reference current I_(REF) and supply various bias voltages to the current comparator circuit 250, such as bias voltages V_(bias1), V_(bias2), V_(bias3), and V_(bias4). The current generator circuit 205 may comprise any circuits and/or devices suitable for generating a desired reference current. For example, the current generator circuit 205 may comprise a bandgap current reference circuit 255 and various transistors.

The bandgap current reference circuit 255 may comprise a conventional circuit suitable for generating a desired reference current. The bandgap current reference circuit 255 may operate in conjunction with various transistors to generate the reference current I_(REF).

The current comparator circuit 250 determines if a current signal exceeds a predetermined threshold current I_(COMP_TH) and generates the comparator output voltage V_(COMP) accordingly. The current comparator circuit 250 may be configured as a folded-cascode comparator. For example, the comparator circuit 250 may comprise a plurality of transistors, such as transistors M1:M4, connected in series and wherein each transistor receives a different bias voltage, such as bias voltages V_(bias1), V_(bias2), V_(bias3), and V_(bias4). Transistors M1 and M2 may comprise PMOS transistors and transistors M3 and M4 may comprise NMOS transistors.

According to an exemplary embodiment, the current comparator circuit 250 may be connected to the current generator circuit 205 to receive various bias voltages to generate fixed currents through transistors M1, M2, M3, and M4. Accordingly, the predetermined threshold current I_(COMP_TH) is established according to the bias voltages and is proportional to the reference current I_(REF) and is described according to the following equation: I_(COMP_TH)=I_(REF)×(1/X), where I_(REF) is the reference current and 1/X is a ratio of the number of transistors in the current comparator 250 to the number of transistors in the current generator 205.

According to an exemplary embodiment, the current comparator circuit 250 may be connected to the replica circuit 225 at a first node N1, wherein the first node N1 is located between the transistors M1 and M2. A voltage at the first node N1 may be referred to as the first node voltage V_(N1). The current comparator circuit 250 may be further connected to the controller 210, via a buffer amplifier 240, at a second node N2, wherein the second node is located between transistors M2 and M3. A voltage at the second node N2 may be referred to as the second node voltage V_(N2).

The current comparator circuit 250 may be further connected to a supply voltage V_(DD). For example, transistor M1 may be directly connected to the supply voltage V_(DD) and transistors M2:M4 are connected indirectly.

The driver 235 (i.e., the driver circuit) facilitates movement of the lens 135 to a desired position. For example, the driver 235 may generate and supply the drive current I_(DR) to the actuator 110. The driver 235 may vary the magnitude and direction of the drive current I_(DR) to achieve the desired position of the lens 135. The actuator 110 is responsive to the drive current I_(DR) and moves the lens 135 an amount that is proportion to the drive current I_(DR). In general, the drive current I_(DR) may be described according to following equation: I_(DR)=A×I_(REF), where A is a gain value and I_(REF) is the reference current.

The driver 235 may comprise any circuit suitable for driving the actuator 110 in response to an input signal. For example, the driver 235 may be configured as an H-bridge driver comprising a plurality of transistors, such as transistors M6:M9. The driver 235 may be further configured to receive and respond to the op-amp output V_(OUT_AMP). For example, a gate terminal of transistor M7 may be connected to an output terminal of the op-amp 220 and operate according to the op-amp output V_(OUT_AMP). In an exemplary embodiment, transistors M6 and M8 are configured as P-channel MOSFETS (PMOS) and M7 and M9 are configured as N-channel MOSFETS (NMOS), wherein each transistor has a gate terminal, a drain terminal, and a source terminal.

In an exemplary embodiment, the driver 235 may be coupled to the actuator 110 at a third node N3, wherein the third node N3 is located between transistors M6 and M7, and a fourth node N4, wherein the fourth node N4 is located between transistors M8 and M9. A voltage at the third node N3 may be referred to as the third node voltage V_(N3) and a voltage at the fourth node N4 may be referred to as the fourth node voltage V_(N4).

Accordingly, selectively operating the transistors M6:M9 will dictate operation of the actuator 110 and/or the flow of the drive current I_(DR). For example, the drive current I_(DR) may flow through the actuator 110 in either a first direction (i.e., a forward direction, as illustrated in FIG. 2) or an opposite second direction (i.e., a reverse direction). The direction of the drive current I_(DR) may be based on the desired position of the lens 135.

According to an exemplary embodiment, the transistors M6:M9 of the driver 235 have a minimum length, based on the fabrication process, to reduce the on-resistance of the driver 235. In general, as a drain-to-source voltage increases, the drive current I_(DR) in short-channel devices increases more compared to long-channel devices.

The replica circuit 225 generates a current (i.e., a replica current I_(REP)) that is proportional to the drive current I_(DR). The replica circuit 225 may be connected to the current comparator circuit 250, the op-amp 220, and the driver 235. The replica circuit 225 may comprise any circuit suitable for generating a current that is proportional to the drive current I_(DR). For example, the replica circuit 225 may comprise a transistor M5, where transistor M5 is an NMOS transistor, and wherein a gate terminal of transistor M5 may be connected to the output terminal of the op-amp 220 and receives the op-amp output V_(OUT_AMP). A source terminal of transistor M5 may be connected to a source terminal of transistor M7. A drain terminal of transistor M5 may be connected to the first node N1 of the current comparator circuit 250 and the replica current I_(REP) flows through the transistor M5 according to the drive current I_(DR).

As the replica current I_(REP) changes, the current comparator circuit 250 compares the replica current I_(REP) to the threshold current I_(COMP_TH) and outputs the comparator voltage V_(COMP) according to the difference. For example, if the replica current I_(REP) is less than the threshold current I_(COMP_TH), then the comparator voltage V_(COMP) is HIGH (e.g., a digital 1), and if the replica current I_(REP) is greater than the threshold current I_(COMP_TH), then the comparator voltage V_(COMP) is LOW (e.g., a digital 0).

According to various embodiments, the methods and apparatus for driver calibration operates to reduce or otherwise remove an offset in the drive current I_(DR). For example, and referring to FIG. 3 the offset is defined as the difference between an actual drive current prior to calibration and an ideal drive current (where the drive current is zero when the DAC value is zero). Accordingly, the methods and apparatus for driver calibration operate to substantially match the actual drive current to the ideal drive current. After calibration, the actual drive current may be within less than 1 least significant bit (LSB) of the ideal drive current. For example, 1 LSB may be equal to 200 uA.

Referring to FIGS. 2-4, during operation, the replica circuit 225 generates the replica current I_(REP) according to the drive current I_(DR). This is accomplished by ensuring that a gate-to-source voltage of the replica transistor M5 (V_(gs_M5)) is the same as a gate-to-source voltage of the transistor M7 (V_(gs_M7)), and that a drain-to-source voltage of the replica transistor M5 (V_(ds_M5)) is the same as a drain-to-source voltage of the transistor M7 (V_(ds_M5)). Since the gate terminal of the replica transistor M5 and the gate terminal of the transistor M7 receive the same voltage (e.g., V_(OUT_AMP)), the gate-to-source voltage of the replica transistor M5 (V_(g)s_M5) is the same as the gate-to-source voltage of the transistor M7 (V_(gs_M7)). Further, since the drain terminal of the replica transistor M5 is connected to the first node N1, which is determined by a bias voltage V_(BIAS2) and is approximately equal to the supply voltage V_(DD) minus an overdrive voltage V_(OD) (i.e., V_(N1)=V_(DD)−V_(OD)), the drain-to-source voltage of the replica transistor M5 (V_(ds_M5)) is substantially the same as the drain-to-source voltage of transistor M7 (V_(ds_M7)) when the drive current I_(DR) is approximately 0 A. The overdrive voltage VOD may range from approximately 0.1V to 0.2V.

According to an exemplary operation, the current comparator 250 compares the replica current I_(REP) to the threshold current I_(COMP_TH). For example, if the threshold current I_(COMP_TH) is, for example, 3 uA, then the current comparator circuit 250 compares the replica current and determines if the replica current is less than or greater than 3 uA and generates the comparator voltage V_(COMP) according to the comparison. If the replica current I_(REP) is less than 3 uA, then the comparator voltage V_(COMP) is HIGH, and if the replica current I_(REP) is greater than 3 uA, then the comparator voltage V_(COMP) is LOW.

The current comparator 250 then transmits the comparator voltage V_(COMP) to the controller 210. The controller 210 receives and responds to the comparator voltage V_(COMP) by increasing or decreasing the OCC. For example, if the comparator voltage V_(COMP) is HIGH, then the OCC is decreased, and if the comparator voltage V_(COMP) is LOW, then the OCC is increased. The DAC 215 utilizes the OCC to change or adjust the calibration voltage V_(CAL), which is then used to generate the feedback voltage V_(F) and generate the op-amp output V_(OUT_AMP).

According to an exemplary method, the calibration is performed when the drive current IDR is approximately 0 A. Referring to FIG. 4, when the drive current is approximately 0 A, the supply voltage V_(DD), the voltage at the third node N3 (V_(N3)) and the voltage at the fourth node N4 (V_(N4)), are substantially the same.

According to the above and as described with respect to the forward direction, the offset current may be corrected in the reverse direction as well.

In the foregoing description, the technology has been described with reference to specific exemplary embodiments. Various modifications and changes may be made, however, without departing from the scope of the present technology as set forth. The description and figures are to be regarded in an illustrative manner, rather than a restrictive one and all such modifications are intended to be included within the scope of the present technology. Accordingly, the scope of the technology should be determined by the generic embodiments described and their legal equivalents rather than by merely the specific examples described above. For example, the steps recited in any method or process embodiment may be executed in any appropriate order and are not limited to the explicit order presented in the specific examples. Additionally, the components and/or elements recited in any system embodiment may be combined in a variety of permutations to produce substantially the same result as the present technology and are accordingly not limited to the specific configuration recited in the specific examples.

Benefits, other advantages and solutions to problems have been described above with regard to particular embodiments. Any benefit, advantage, solution to problems or any element that may cause any particular benefit, advantage or solution to occur or to become more pronounced, however, is not to be construed as a critical, required or essential feature or component.

The terms “comprises”, “comprising”, or any variation thereof, are intended to reference a non-exclusive inclusion, such that a process, method, article, composition or apparatus that comprises a list of elements does not include only those elements recited, but may also include other elements not expressly listed or inherent to such process, method, article, composition or apparatus. Other combinations and/or modifications of the above-described structures, arrangements, applications, proportions, elements, materials or components used in the practice of the present technology, in addition to those not specifically recited, may be varied or otherwise particularly adapted to specific environments, manufacturing specifications, design parameters or other operating requirements without departing from the general principles of the same.

The present technology has been described above with reference to an exemplary embodiment. However, changes and modifications may be made to the exemplary embodiment without departing from the scope of the present technology. These and other changes or modifications are intended to be included within the scope of the present technology. 

1. A circuit, comprising: a current comparator circuit comprising: a first node having a first voltage; and a second node having a second voltage; a driver comprising: a first terminal responsive to the second voltage; and a second terminal connected to a reference voltage; and a replica circuit comprising: a third terminal connected to the first node; a fourth terminal connected to the second terminal of the driver; and a fifth terminal connected to the first terminal of the driver.
 2. The circuit according to claim 1, wherein the replica circuit generates a replica current that is proportional to the drive current
 3. The circuit according to claim 1, wherein the current comparator circuit comprises a first transistor and a second transistor connected in series with each other.
 4. The circuit according to claim 3, wherein the first node is located between the first transistor and the second transistor.
 5. The circuit according to claim 3, wherein the second node is located between the second transistor and the third transistor.
 6. The circuit according to claim 1, wherein the current comparator circuit generates a comparator output voltage at the second node.
 7. The circuit according to claim 1, wherein the replica circuit comprises a transistor and the third terminal is a drain terminal, the fourth terminal is a source terminal, and the fifth terminal is a gate terminal.
 8. A driver calibration circuit, comprising: a current comparator circuit configured to generate a threshold current and comprising a first node and a second node; a controller connected to the second node of the current comparator circuit; a digital-to-analog converter (DAC) connected to an output terminal of the controller; an amplifier connected to an output terminal of the DAC; a driver connected to an output terminal of the amplifier and having a first current; and a replica circuit connected to: the first node of the current comparator circuit; the output terminal of the amplifier; and the driver; wherein the replica circuit has a second current that is proportional to the first current.
 9. The driver calibration circuit according to claim 8, wherein the current comparator circuit comprises a first transistor and a second transistor connected in series with each other.
 10. The driver calibration circuit according to claim 9, wherein: the first node is located between the first transistor and the second transistor; and the second node is located between the second transistor and the third transistor.
 11. The driver calibration circuit according to claim 8, wherein the current comparator circuit generates a comparator output voltage at the second node.
 12. The driver calibration circuit according to claim 11, wherein: the comparator output voltage is HIGH if the second current is less than the threshold current; and the comparator output voltage is LOW if the second current is greater than the threshold current.
 13. The driver calibration circuit according to claim 8, wherein the replica circuit comprises a third transistor comprising: a drain terminal connected to the first node of the current comparator circuit; a source terminal connected to the driver; and a gate terminal connected to the driver and the output terminal of the amplifier.
 14. The driver calibration circuit according to claim 8, wherein: the driver comprises a fourth transistor; a gate terminal of the fourth transistor is connected to the output terminal of the amplifier; and a source terminal of the fourth transistor is connected to the replica circuit.
 15. The driver calibration circuit according to claim 8, wherein, when the first current is approximately zero amperes, a drain voltage of the drive transistor is approximately equal to a supply voltage.
 16. A system, comprising: an actuator; and a control circuit configured to control the actuator and comprising: a current comparator circuit configured to generate a threshold current and comprising a first node and a second node; a controller connected to the second node of the current comparator circuit; a digital-to-analog converter (DAC) connected to an output terminal of the controller; an amplifier connected to an output terminal of the DAC; a driver connected to an output terminal of the amplifier; and a replica circuit comprising: a first terminal connected to the first node; a second terminal connected to a first terminal of the driver; and a third terminal connected to a second terminal of the driver and the amplifier.
 17. The system according to claim 1, wherein the replica circuit has a current that is proportional to a current through the driver.
 18. The system according to claim 1, wherein the current comparator comprises a first transistor and a second transistor connected in series with each other.
 19. The system according to claim 1, wherein: the first node is located between the first transistor and the second transistor; and the second node is located between the second transistor and the third transistor.
 20. The system according to claim 1, wherein the current comparator circuit generates a comparator output voltage according to a comparison of a current of the replica circuit and the threshold current. 